﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Work4
{
    class Program
    {
        static void Main(string[] args)
        {
            Plants plants = new Plants();  //2.类的访问修饰符——internal类 的调用



            Fish fish = new Fish();  //4.类的修饰符—— sealed类 的调用
            fish.Num = 15;
            fish.Name = "沙丁鱼";
            Console.WriteLine(fish.Num);
            Console.WriteLine(fish.Name);



            Console.WriteLine(Deer.id);  //5.类的修饰符—— static类 的调用
            Deer.Gender = "雄性";
            Console.WriteLine(Deer.Gender);
            Deer.Action();

            string telent = "与猎食者斗智斗勇";  //静态类的扩展方法的调用
            telent.Run();

            Rabbit.Play();  //普通类中静态类方法的调用



            SmallTiger smallTiger = new SmallTiger(); //子类继承原来的类的全部内容
            smallTiger.name = "泰哥";
            smallTiger.age = 3;
            Console.WriteLine(smallTiger.name);
            Console.WriteLine(smallTiger.age);



            Animals animals = new Animals();  //7.类成员的访问修饰符—— internal类 的调用
            animals.age = 20;
            Console.WriteLine(animals.age);



            Lion lion = new Lion
            {
                age = 36,
                title = "狮子王"
            };

            

            var h1 = new Monkey();              //封装
            h1.Age = 50;

            var h2 = new Monkey
            {
                Age = -24
            };

            var h3 = new Monkey();
            h3.Age = 97;

            Console.WriteLine(h1.Age);
            Console.WriteLine(h2.Age);
            Console.WriteLine(h3.Age);



            Mouse mouse = new Mouse();       //字段的修饰符 --- readonly和static
            Mouse.size = "大老鼠";
            Console.WriteLine(Mouse.size);


        }
    }
}
